package org.fang;

import com.netflix.hystrix.contrib.metrics.eventstream.HystrixMetricsStreamServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;

/**
 * @Author forsake
 * @Description
 * @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})代表数据库自动注入，加了会报错
 * @Date 17:25 2022/3/9
 **/
@SpringBootApplication
// zuul可以实现路由的代理和过滤
@EnableZuulProxy // 导入代理通过www.fang.com:9527/cloud-provider/cloudUser/queryById/1访问其他服务端的接口，隐藏真实的额地址，cloud-provider要小写
public class CloudZuul {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(CloudZuul.class, args);
    }
}
